package com.net.util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.orm.hibernate3.HibernateTemplate;

public class HibernateUtil {
	private static HibernateTemplate ht;
	static {
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
		ht = (HibernateTemplate) ac.getBean("hibernateTemplate");
	}
	public static HibernateTemplate getHibernateTemplate(){
		return ht;
	}
}
